<template>
	<view class="content">
		<image class="logo" src="/static/popop.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<button type="primary" @click="goAdmin">进入接龙</button>
	</view>
</template>

<script setup>
	import {
		onMounted,
		ref
	} from 'vue';

	const title = ref('欢迎使用泡泡接龙小程序')

	onMounted(() => {
		const userInfo = uni.getStorageSync('userInfo') || {}
		if (!userInfo.openid) {
			wxLogin()
		}
	})

	const goAdmin = () => {
		console.log('跳转admin');
		uni.navigateTo({
			url: '/pages/admin/admin'
		})
	}
</script>

<style lang="scss" scoped>
	.content {
		height: 80vh;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-evenly;

		.logo {
			height: 100rpx;
			width: 100rpx;
			/* 		margin-top: 200rpx; */
			margin-left: auto;
			margin-right: auto;
			/* margin-bottom: 50rpx; */
		}

		.text-area {
			display: flex;
			justify-content: center;

			.title {
				font-size: 36rpx;
				color: #8f8f94;
			}
		}
	}
</style>